-- GENERATED SPELL FOR [Syndicate Magus] --


function spell0_2591(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_2591', 0, 1)
end

function spell1_2591(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2591', 7000, 1)
end

function Sorts_2591(pUnit, Event)
local choix_sorts_2591 = math.random(0, 1)
if choix_sorts_2591 == 0 then
pUnit:RegisterEvent('spell0_2591', 1, 1)
end
if choix_sorts_2591 == 1 then
pUnit:RegisterEvent('spell1_2591', 1, 1)
end
end

function mob2591_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2591', math.random(1500, 3000), 1)
end

function mob2591_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2591_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2591_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2591, 1, 'mob2591_Action')
RegisterUnitEvent(2591, 2, 'mob2591_Leave')
RegisterUnitEvent(2591, 3, 'mob2591_Kill')
RegisterUnitEvent(2591, 4, 'mob2591_Die')
